<script type="text/javascript">
$(document).ready(function () {
	$('img[name=print]').click(function(){
		printDiv('printableArea');
	});
});

</script>

<img src="view/templates/temp1/images/print_button.png" width="109" name="print"/>
<div class="mws-panel grid_8">
                	<div class="mws-panel-header">
                    	<span class="mws-i-24 i-table-1">List Finished Schedule</span>
                    </div>
                    <div class="mws-panel-body" id="printableArea">
                        <table class="mws-datatable-fn mws-table">
                            <thead>
                                <tr>
                                	<th>Tool</th>                              
                                    <th>PIC</th>
                                    <th>Client's Co, Name, Contact & Venue/Location</th>
                                    <th>Delivery</th>
                                    <th>Collection</th>
                                    <th>Status</th>
                                </tr>
                            </thead>
                            <tbody>  
                            {foreach from = $scheduleArr item = schedule}
                                <tr class="gradeX">
                                	<td>
                                		{if $schedule->getScheduleDomain()->getStatus() eq 0}
                                    		<a href="index.php?func=schedule&opt=viewDeliverySchedule&scheduleID={$schedule->getScheduleDomain()->getScheduleID()}">View</a> |
                                    	{/if}
                                    	{if $schedule->getScheduleDomain()->getStatus() eq 1}
                                    		<a href="index.php?func=schedule&opt=viewCollectionSchedule&scheduleID={$schedule->getScheduleDomain()->getScheduleID()}">View</a> |
                                    	{/if}
                                    	{if $schedule->getScheduleDomain()->getStatus() eq 2}
                                    		<a href="index.php?func=schedule&opt=viewFinishedSchedule&scheduleID={$schedule->getScheduleDomain()->getScheduleID()}">View</a> |
                                    	{/if}
                                	<a href="index.php?type=schedule&action=deleteSchedule&scheduleID={$schedule->getScheduleDomain()->getScheduleID()}">Delete</a>
                                	</td>
                                    <td>{$schedule->getMemberDomain()->getPIC()}</td>
                                    <td>{$schedule->getMemberDomain()->getClientCompany()} <br />
                                     	{$schedule->getMemberDomain()->getClientName()} <br />
                                      	{$schedule->getMemberDomain()->getClientContact()} {$schedule->getMemberDomain()->getLocation()}
                                    </td>
                                 
                                    <td class="center">{$tool-> ddMMyyyy({$schedule->getScheduleDomain()->getDeliveryDate()})} {if $schedule->getScheduleDomain()->getDeliveryTime() ne '00:00:00'} {$tool->convert24hTo12h($schedule->getScheduleDomain()->getDeliveryTime())}{/if}</td>
                                    <td class="center">{$tool-> ddMMyyyy({$schedule->getScheduleDomain()->getCollectionDate()})} {if $schedule->getScheduleDomain()->getCollectionTime() ne '00:00:00'}{$tool->convert24hTo12h($schedule->getScheduleDomain()->getCollectionTime())}{/if}</td>
                                    <td>
                                    	{if $schedule->getScheduleDomain()->getStatus() eq 0}
                                    		Peding delivery
                                    	{/if}
                                    	{if $schedule->getScheduleDomain()->getStatus() eq 1}
                                    		Peding collection
                                    	{/if}
                                    	{if $schedule->getScheduleDomain()->getStatus() eq 2}
                                    		Finished
                                    	{/if}
                                </tr>
                            {/foreach}                            
                            </tbody>
                        </table>
                    </div>
                </div>